<template>
    <TechModal class="tech-set-default-card-modal" :isTitle="false" v-model="showDefault">
        <div class="content">确定将此卡设为本店常用会员卡，在本<br />门店消费默认使用此卡权益</div>
        <div class="btn-list">
            <Button class="tech-btn" @click="close">取消</Button>
            <Button class="tech-btn" type="danger" @click="ensure">确定</Button>
        </div>
    </TechModal>
</template>

<script>
import { Button } from 'vant';
import { TechModal } from '@components/base';
export default {
    name: 'SetDefaultCardModal',
    components: {
        Button,
        TechModal,
    },
    data() {
        return {
            showDefault: false,
        };
    },
    methods: {
        show() {
            this.showDefault = true;
        },
        close() {
            this.showDefault = false;
        },
        ensure() {
            this.$emit('ensure', true);
            this.close();
        },
    },
};
</script>

<style lang="less">
.tech-set-default-card-modal {
    .content {
        .p(@gap-md);
        .t-c();
        .font-size-md();
    }
    .btn-list {
        .flex-center();
        .tech-btn {
            flex: 1;
            &:last-child {
                .m-l(@gap-md);
            }
        }
    }
}
</style>

